<% remote_form_for @hot_post,
    :url => tools_zhui_tian_ya_hot_posts_url,
    :method => :post,
    :html => {
      :id => :new_hot_post_form
    } do |f| %>
<div id="head" class='m'>
  <div class='tip'>
    您输入天涯贴网址，由麦吐司来盯着，贴主一有更新就通知您！
  </div>
  <dl class='s'>
    <dt>输入天涯贴网址：</dt>
    <dd>
      <%= f.text_field :requested_url, :class => 't' %>        
    </dd>
    <dd>
      <%= link_to_remote  image_tag('tools/search.png', :size => '25x25'),
             :update => :new_zhui_hot_post,
             :url => new_tools_zhui_tian_ya_hot_post_url, 
             :method => :get,
             :with => "$('new_hot_post_form').serialize()",
             :loading => small_loading('search_now',:width => 'auto'),
             :html => {
              :class => :search,
              :id => 'search_now'
             } %>
    </dd>
  </dl>
</div>
<% if @hot_post.requested_url.present? %>
  <% if @hot_post.requested_url_error? %>
  <div id="hot_post" class='m'>
    <div class='error'>
      <%= @hot_post.requested_url_error %>
    </div>
  </div>
  <% else %>  
  <div id='alert' class='corner'>
    <b>注：</b>作品各种权益与责任归原作者所有
  </div>
  <div id="hot_post" class='m'>
    <div class='corner'>
      <dl class='title'>
        <dt>『<%= @hot_post.hot_post_type.name %>』</dt>
        <dd>          
          <%= @hot_post.title %>
        </dd>
      </dl>
      <dl>
        <dt>作者：</dt>
        <dd><%= @hot_post.author %></dd>
      </dl>
      <dl>
        <dt>发表日期：</dt>
        <dd><%= @hot_post.first_released_at.to_s %></dd>
      </dl>
      <dl>
        <dt>
          一楼内容：
        </dt>
      </dl>
      <dl class='first_content'>
        <dd>
          <%= @hot_post.first_post_content %>
        </dd>
      </dl>
      <% if @existed_one %>
      <dl class='first_zhui corner'>
        <dt>
          第一追：
        </dt>
        <dd>
          <%= link_to @existed_one.user.nick_name, user_url(@existed_one.user) , :target => :_blank %>发起于<%= time_ago_in_words @existed_one.created_at, false %>前
        </dd>
      </dl>    
      <% end %>
    </div>
  </div>
  <div id="foot" class='m'>
    <%= link_to_remote  '就它！<b>楼主</b>一有更新就通知我.',
          :update => :new_zhui_hot_post,
          :url => tools_zhui_tian_ya_hot_posts_url, 
          :method => :post,
          :with => "$('new_hot_post_form').serialize() + '&scope=lz'",
          :loading => small_loading('foot',:width => 'auto'),
          :html => {
            :class => 'zhui lz corner',
            :id => 'zhui_lz'
          } %>
    <%= link_to_remote  '就它！只要<b>有人</b>跟帖就通知我.',
          :update => :new_zhui_hot_post,
          :url => tools_zhui_tian_ya_hot_posts_url, 
          :method => :post,
          :with => "$('new_hot_post_form').serialize() + '&scope=all'",
          :loading => small_loading('foot',:width => 'auto'),
          :html => {
            :class => 'zhui all corner',
            :id => 'zhui_all'
          } %>
    <%= link_to '离开此页面，去看看大伙追啥', tools_zhui_tian_ya_hot_posts_url, :class => 'close corner' %>
  </div>
  <% end %>
<% else %>
<div id="hot_post" class='m blank'>
  <div class="helps">
  <div>
    <b>1</b><span>提交贴网址</span>
  </div>
  <div><%= image_tag 'tools/arrow.gif' %></div>
  <div class="low">
    <b>2</b><span>设置追踪规则</span>
  </div>
  <div><%= image_tag 'tools/arrow.gif' %></div>
  <div class="low">
    <b >3</b><span><b class='my'>麦</b><b class='tusi'>吐司</b>定期向您汇报帖更新情况</span>
  </div>
</div>
</div>
<% end %>
<% end %>